package com.purchase.mapper;

import com.purchase.entity.Withdraw;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@MyBatisRepository
public interface WithdrawMapper extends Mapper<Withdraw> {

    /**
     * 统计代购待返现金额
     *
     * @param chargeMap
     * @return
     */
    List<Map<String, Object>> getWaitBackCharges(HashMap<String, Object> chargeMap);

    /**
     * 统计代购待返现订单
     *
     * @param chargeMap
     * @return
     */
    Integer getWaitBackCount(HashMap<String, Object> chargeMap);

    /**
     * 统计代购已返现金额、订单
     *
     * @param wxUid
     * @return
     */
    Map<String, Object> getHaveBackInfo(@Param("wxUid") String wxUid);

    /**
     * 查询已提现金额
     * @param wxUid
     * @return
     */
    BigDecimal getWithdrawedCharge(@Param("wxUid") String wxUid);
}
